package com.billy.ohos.swipe.demo.util;

import com.ryan.ohos.extension.event.interfaces.ComponentParentHack;
import ohos.agp.components.AttrSet;
import ohos.agp.components.ComponentContainer;
import ohos.agp.components.DirectionalLayout;
import ohos.app.Context;

public class ItemWrapper extends DirectionalLayout implements ComponentParentHack {

    private ComponentContainer parent;

    public ItemWrapper(Context context) {
        super(context);
    }

    public ItemWrapper(Context context, AttrSet attrSet) {
        super(context, attrSet);
    }

    public ItemWrapper(Context context, AttrSet attrSet, String styleName) {
        super(context, attrSet, styleName);
    }

    @Override
    public ComponentContainer getComponentParentHack() {
        return parent;
    }

    @Override
    public void setComponentParent(ComponentContainer parent) {
        this.parent = parent;
    }
}
